﻿using System;

namespace Designit.Umbraco.Datatypes.VideoEmbed
{
    public class DataType : umbraco.cms.businesslogic.datatype.BaseDataType, umbraco.interfaces.IDataType
    {
        private umbraco.interfaces.IData baseData;
        private umbraco.interfaces.IDataEditor editor;

        public override umbraco.interfaces.IData Data
        {
            get
            {
                if (baseData == null)
                    baseData = new umbraco.cms.businesslogic.datatype.DefaultData(this);

                return baseData;
            }
        }

        public override string DataTypeName
        {
            get { return "VideoEmbed"; }
        }

        public override Guid Id
        {
            get { return new Guid("B5D96848-0FE8-4c29-8EAA-BADEF8D3288D"); }
        }

        public override umbraco.interfaces.IDataPrevalue PrevalueEditor
        {
            get { throw new NotImplementedException(); }
        }

        public override umbraco.interfaces.IDataEditor DataEditor
        {
            get
            {
                if (editor == null)
                    editor = new DataEditor(Data);

                return editor;
            }
        }



    }
}


